Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E testing enhancements #2408

Merged
merged 7 commits into from
Jun 26, 2017
Merged

Conversation

EnoahNetzach
Copy link
Contributor

@EnoahNetzach EnoahNetzach commented May 29, 2017

Features to add:

  • local testing with docker

  • bash callback after the docker entrypoint

  • docs explaining how testing is managed and how to contribute

  • test modified files

@ro-savage
Copy link
Contributor

Is it possible to pass jest errors along to the e2e tests?

I'm not entirely sure what you mean.
jest runs should always log to terminal, isn't it?

I tried to reproduce this and wasn't able to. So just ignore that comment, if I come across it again / can reproduce I'll let you know.

@ro-savage
Copy link
Contributor

Actually, can confirm that the errors are being passed correctly. The error I saw was only because I had edited the tmp files directly.

Happy to review your readme etc when its ready. Just ping me.

Thanks again for your help debugging the e2e stuff.

Copy link
Contributor

@ro-savage ro-savage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good!

Just some minor thoughts/tweaks.

Still wonder if its possible to direct people to where the test failed test, development, production or eject when it does fail. Just since people often skip readme's. Although it might have just been a rare edge case (or stupidity) where it wasn't obvious that test was failing rather than development / production.

This is a simple script that runs a **Docker** container, where the node version, git branch to clone, test suite, and whether to run it with `yarn` or `npm` can be chosen.
Simply run `yarn e2e:docker -- --help` to get additional info.

N.B.: this command will clone the local repository in the docker container, so any uncommitted changes are ignored.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to run this on uncommitted changes. As normally I'd make changes, write tests, run tests. And then if everything works commit changes.

With this, I'd be making changes, committing, testing, making changes, committing, testing, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, coming soon!

CONTRIBUTING.md Outdated
## Contributing to E2E (end to end) tests

All information are in the dedicated [README](/packages/react-scripts/fixtures/kitchensink/README.md).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth putting in a TL:DR?

TL:DR use the command yarn e2e:docker to run unit and e2e tests

@gaearon gaearon merged commit 1f91848 into facebook:master Jun 26, 2017
@gaearon
Copy link
Contributor

gaearon commented Jun 26, 2017

Thanks for this!

@gaearon gaearon added this to the 1.0.8 milestone Jun 26, 2017
@EnoahNetzach EnoahNetzach deleted the local-testing branch June 26, 2017 17:01
@gaearon
Copy link
Contributor

gaearon commented Jun 28, 2017

Can you add info on how to setup Docker for this? At least a link. I can't seem to figure it out.

@EnoahNetzach
Copy link
Contributor Author

Do you mean how to setup Docker itself on various OSes?

@gaearon
Copy link
Contributor

gaearon commented Jun 28, 2017

I guess I'll try official instructions (linking to them would be welcome).
I hoped brew install docker would work but I can't get daemon to run.

@EnoahNetzach
Copy link
Contributor Author

https://docs.docker.com/engine/installation/, I'll link them in the docs in a minute

@EnoahNetzach
Copy link
Contributor Author

https://docs.docker.com/docker-for-mac/install/ specifically for Mac

@Timer
Copy link
Contributor

Timer commented Jun 28, 2017

FWIW brew cask install docker is what works. Make sure you open the docker application, as it populates the CLI tool into your PATH.

romaindso pushed a commit to romaindso/create-react-app that referenced this pull request Jul 10, 2017
* Local testing with docker

* Docs on e2e testing

* `bash` callback after docker

* Add a TL;DR in the CONTRIBUTING section

* Local e2e testing with modified files

* Remove the N.B. from the README

* Fixed a fixme in e2e doc
wmonk referenced this pull request in wmonk/create-react-app-typescript Aug 7, 2017
* Local testing with docker

* Docs on e2e testing

* `bash` callback after docker

* Add a TL;DR in the CONTRIBUTING section

* Local e2e testing with modified files

* Remove the N.B. from the README

* Fixed a fixme in e2e doc
morgs32 pushed a commit to BrickworkSoftware/create-react-app that referenced this pull request Sep 1, 2017
* Local testing with docker

* Docs on e2e testing

* `bash` callback after docker

* Add a TL;DR in the CONTRIBUTING section

* Local e2e testing with modified files

* Remove the N.B. from the README

* Fixed a fixme in e2e doc
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants